package org.jeecg.modules.report.service;


import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.report.vo.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;
import java.util.List;

/**
 * @Description: 设施设备模块
 * @Author: liur
 * @Date:   2019-08-22
 * @Version: V1.0
 */
@FeignClient("CIM-ENGINEERING")
public interface IEquipDataService {

	/**
	 * 获取设备状态 - 使用、停用
	 * @param projectId
	 * @param tenantId
	 * @return
	 */
	@RequestMapping(value = "/api/equip/findStatusByProjectAndSort",method = RequestMethod.POST)
	Result<List<EquipStatusReport>> findStatusByProjectAndSort(@RequestParam("projectId") String projectId,
															   @RequestParam("sortId") String sortId,
															   @RequestHeader("tenantId") String tenantId);


	/**
	 *
	 * @param projectId
	 * @param levelList
	 * @param tenantId
	 * @return
	 */
	@RequestMapping(value = "/api/equip/findEventInfoSumByProject",method = RequestMethod.POST)
	Result<List<EquipEventInfoSum>> findEventInfoSumByProject(@RequestParam("projectId") String projectId,
															  @RequestParam("levelList") String levelList,
															  @RequestParam("startTime") Date startTime,
															  @RequestHeader("tenantId") String tenantId);


	/**
	 *	设备事件明细 - 项目级
	 * @param minLevel  警报级别低
	 * @param maxLevel  警报级别高
	 * @return
	 */
	@RequestMapping(value = "/api/equip/findEventInfoByProject",method = RequestMethod.POST)
	Result<EquipEventReport> findEventInfoByProject(@RequestParam("projectId") String projectId,
													@RequestParam("minLevel") Integer minLevel,
													@RequestParam("maxLevel") Integer maxLevel,
													@RequestHeader("tenantId") String tenantId);

	/**
	 * 设备状态统计-项目级-归属系统
	 * @param projectId
	 * @param topSystem  归属系统
	 * @param tenantId
	 * @return
	 */
	@RequestMapping(value = "/api/equip/getSmartDeviceCenter",method = RequestMethod.POST)
	Result<SmartDeviceCenterOne> getSmartDeviceCenter(@RequestParam("projectId") String projectId,
								  @RequestParam("topSystem") String topSystem,
								  @RequestHeader("tenantId") String tenantId);


	/**
	 * 未处理事件(事件分类别)合计数 - 项目级 - 归属系统
	 * @param projectId
	 * @param topSystem
	 * @param tenantId
	 * @return
	 */
	@RequestMapping(value = "/api/equip/findUnProcessByProjectAndSystem",method = RequestMethod.POST)
	Result<List<EventProcessStatus>> findUnProcessByProjectAndSystem(@RequestParam("projectId") String projectId,
																	 @RequestParam("topSystem") String topSystem,
																	 @RequestHeader("tenantId") String tenantId);


	@RequestMapping(value = "/api/equip/getLiftRealVedioUrl",method = RequestMethod.POST)
	Result<String> getLiftRealVedioUrl(@RequestParam("registerCode") String registerCode,
									   @RequestParam("isHttps") Boolean isHttps,
									   @RequestHeader("tenantId") String tenantId);

}
